package cn.codelab.springcloudalibaba.study.step07.feign.fallback;

import cn.codelab.springcloudalibaba.study.step07.feign.EchoClient;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @author Seven
 * @description
 * @博客：https://codelab7.cn
 * @Gitee https://gitee.com/it-codelab
 * @Copyright 公众号：Seven的代码实验室
 */
@Slf4j
@Component
public class EchoClientFallback implements EchoClient {
    @Setter
    private Throwable e;

    @Override
    public String echo(String str) {
        log.error("进入降级逻辑，异常信息：{}", e);
        return "echo fallback";
    }
}
